[8c4ad8]: / assets / dna / random / Random DNA Generator.py

Download this file

17 lines (12 with data), 342 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from random import choice
__summary__ = "Generate a random DNA file that is 100MB"
__author__ = "@Nv7-GitHub (Nishant Vikramaditya)"
__version__ = "2.0.1"
SIZE = 100000000
codes = ["a", "t", "g", "c"]
txt = ""
for _ in range(0, SIZE):
txt += choice(codes)
with open("files/dna/dnalong.fa", "w+") as f:
f.write(txt)
print("Done.")